-- GENERATED SPELL FOR [Trapped Soul] --


function spell0_16482(pUnit, Event) --@Cone of Cold,Self--
pUnit:FullCastSpellOnTarget(29717,pUnit)
pUnit:RegisterEvent('Sorts_16482', 8316, 1)
end

function spell1_16482(pUnit, Event) --@Elemental Armor,Self--
pUnit:FullCastSpellOnTarget(29718,pUnit)
pUnit:RegisterEvent('Sorts_16482', 0, 1)
end

function Sorts_16482(pUnit, Event)
local choix_sorts_16482 = math.random(0, 1)
if choix_sorts_16482 == 0 then
pUnit:RegisterEvent('spell0_16482', 1, 1)
end
if choix_sorts_16482 == 1 then
pUnit:RegisterEvent('spell1_16482', 1, 1)
end
end

function mob16482_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16482', math.random(1500, 3000), 1)
end

function mob16482_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16482_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16482_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16482, 1, 'mob16482_Action')
RegisterUnitEvent(16482, 2, 'mob16482_Leave')
RegisterUnitEvent(16482, 3, 'mob16482_Kill')
RegisterUnitEvent(16482, 4, 'mob16482_Die')
